﻿#ifndef ERROR_H
#define ERROR_H
#include <QObject>

#define _err    error(__LINE__, __FILE__)
#define _errstr (_err = -1)

class errorPrivate;

class error
{
public:
    error() = default;
	~error();

    error(int line, const char *file);

    error &operator =(void *p);

    bool  operator =(QString errstr);

    error &operator =(int number);

    void setErrorStr(QString str);

    bool isFail();

private:
    errorPrivate *d;
};
#endif // ERROR_H
